Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add play/explore method to interactively view 3d image or framestack #29

Merged
merged 7 commits into from
Apr 15, 2021

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented Mar 9, 2021

Rework JuliaImages/ImageInTerminal.jl#43, I've removed the codes related to terminal rendering in this PR to adapt vscode/atom display, I'd prefer to pend the terminal rendering functionality until this is done.

In short words, play method provides an interactive alternative to gif view.

Hopefully, we could make this implementation the default Base.show method for 3d image. I'm not sure of it, so I didn't export the name play yet.

Feedback, review, and any kind of features suggestions are welcome.

preview:

2021-03-09 16-34-36 2021-03-09 16_35_54

Unlike the original PR, play method here supports framestack of different image sizes (see the second demo gif).

2021-03-09 16-42-04 2021-03-09 16_42_55

cc: @IanButterworth

@johnnychen94 johnnychen94 mentioned this pull request Mar 9, 2021
2 tasks
@johnnychen94

This comment has been minimized.

@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #29 (aa9e03c) into master (4f7129e) will decrease coverage by 5.50%.
The diff coverage is 82.56%.

❗ Current head aa9e03c differs from pull request most recent head 91d1bc5. Consider uploading reports for the commit 91d1bc5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
- Coverage   93.51%   88.01%   -5.51%     
==========================================
  Files           4        6       +2     
  Lines         108      217     +109     
==========================================
+ Hits          101      191      +90     
- Misses          7       26      +19     
Impacted Files Coverage Δ
src/ImageShow.jl 40.00% <ø> (ø)
src/compat.jl 33.33% <0.00%> (-16.67%) ⬇️
src/keyboard.jl 79.16% <79.16%> (ø)
src/multipage.jl 86.66% <86.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f7129e...91d1bc5. Read the comment docs.

@johnnychen94 johnnychen94 force-pushed the jc/play branch 2 times, most recently from 6c36887 to 08f5d40 Compare April 15, 2021 12:36
@johnnychen94
Copy link
Member Author

For the coverage report:

  • play and explore are very thin wrappers of the internal _play methods
  • error handling

Manually using them locally seems pretty nice. So I'll say this PR is ready, I'll update the README and then merge it.

@IanButterworth
Copy link
Member

I just noticed that in the example gifs, vscode appears to be creating a new plot per frame? Does it retain the old plots? That would be bad for memory usage

@johnnychen94
Copy link
Member Author

johnnychen94 commented Apr 15, 2021

Does it retain the old plots? That would be bad for memory usage

Unfortunately yes, I can't find a way to refresh on the same plot. Do you have any ideas? (I use display to do this)

@johnnychen94 johnnychen94 changed the title add play method for framestack and 3D image add play/explore method to interactively view 3d image or framestack Apr 15, 2021
@johnnychen94
Copy link
Member Author

johnnychen94 commented Apr 15, 2021

This PR is growing bigger so I still decide to merge it. I've marked them as experimental features and we can fix the left issues(#33 #34) in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants